package cuckoo.test;

import cuckoo.aop.ProxyBeanFactory;
import cuckoo.aop.anno.onAfter;
import cuckoo.aop.anno.onBefore;
import cuckoo.aop.anno.onException;
import cuckoo.aop.config.Listener.AnnoProxyListener;
import cuckoo.ioc.CuckooContainer;

/**
 * Hello world!
 *
 */
public class App {
	public static void main(String[] args) {
		CuckooContainer container = new CuckooContainer("cuckoo.test");
		// container.addScannerListner(new ActionFilter());
		ProxyBeanFactory factory = new ProxyBeanFactory();
		factory.addListener(new AnnoProxyListener(onBefore.class));
		factory.addListener(new AnnoProxyListener(onAfter.class));
		factory.addListener(new AnnoProxyListener(onException.class));
		container.setBeanFactory(factory);
		container.start();
		container.getBean("hhh", Hello.class).say();

	}
}
